BigDFT.Interop.PolarisInterop module

A module to define typical operations that can be done on biological systems starting from the API and the PDB standards employed in the Polaris code

read_polaris_sle(slefile)[source]

Read the setup file of polaris with the atomic information.

Parameters:

slefile (str) – the sle polaris file.

Returns:

a list of the atoms of the system with the same order of

the pdbfile, ready to be passed to the atoms attribute

Return type:

list

write_bigdft_charges_in_sle(charges, slefile, outfile)[source]

Override polaris charges coming from BigDFT file in the sle

Parameters:
  • charges (dict) – dictionary of the {iat: charges}, with iat from the pdb

  • slefile (str) – the sle polaris file.

  • outfile (str) – the output file

read_polaris_pdb(pdbfile, chain_as_letter=False, slefile=None)[source]

Read coordinates in the PDB format of POLARIS

Parameters:
  • pdbfile (str) – path of the input file

  • chain_as_letter (bool) – If True, the fifth column is assumed to contain a letter

  • slefile (str) – path of the file .sle of Polaris from which to extract the system’s attributes.

Warning

Assumes Free Boundary conditions for the molecule. Only accepts atoms that have one letter in the symbol. Switch representation if there is a single letter in the fifth column

Returns:

A system class

Return type:

System

split_pdb_trajectory(directory, filename, prefix)[source]

Split a trajectory file into various PDB files containing a single snapshot.

Parameters:
  • directory (str) – the path of the directory in which the trajectory file exists

  • filename (str) – the trajectory file name

  • prefix (str) – the name to be provided to the resulting files. Files are numbered by `prefix`0,1, etc.

Returns:

list of the files created, including the directory

Return type:

list

calculate_fragment_charge(cion)[source]

Charge of the counter ions of the fragment.

Parameters:

cion (Fragment) –

Returns:

the charge to be applied once this fragment removed.

Return type:

int

convert_pdb(filein, fileout, counter_ion_frag='O-ION:999', **kwargs)[source]

Call the func:read_polaris_pdb function to convert the system, and verify that the converted filename is giving the same system.

Parameters:
  • filein (str) – input file path

  • fileout (str) – output file path. Can be identical to filein

  • counter_ion_frag (str) – name of the counter ion fragment

  • **kwargs – arguments to be passed to func:read_polaris_pdb

Returns:

the charge of the system with the counterion removed

Return type:

int